<table width="100%"><tr><td width="20%">
<a href="../index.html">&lt; index</a><br />
<a href="index.html">&lt; 11. Compression toolkit</a><br />
<a href="zip_init.html">&lt; 11.1 Creating a compression buffer</a>
</td><td width="60%">
<p align="center">
=====================================<br />
11.2 Putting data in the buffer<br />
=====================================<br />
</p></td><td width="20%">
<a href="zip_save.html">&gt; 11.3 Saving the compressed data to a file</a>
</td></tr></table>
<style type="text/css">
.code { color:#444444; background-color:#EEEEEE;}
pre { color:#444444; background-color:#EEEEEE;}
table.param td { border : 1px solid #000000; }
th { background-color: #44BBFF; color: #FFFFFF }
table.none td { border : 0 }
</style>
You can add data in the buffer by using one of those functions.<br />
<p class="code"><pre>
C++ : void TCODZip::putChar(char val)
C   : void TCOD_zip_put_char(TCOD_zip_t zip, char val)
</pre></p>
<br />
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>zip</td><td>In the C version, the buffer handler, returned by the <a href="zip_init.html">constructor</a>.<br /></td></tr>
<tr><td>val</td><td>A 8 bits value to store in the buffer</td></tr>
</table>
<hr />
<p class="code"><pre>
C++ : void TCODZip::putInt(int val)
C   : void TCOD_zip_put_int(TCOD_zip_t zip, int val)
</pre></p>
<br />
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>zip</td><td>In the C version, the buffer handler, returned by the <a href="zip_init.html">constructor</a>.<br /></td></tr>
<tr><td>val</td><td>An integer value to store in the buffer</td></tr>
</table>
<hr />
<p class="code"><pre>
C++ : void TCODZip::putFloat(float val)
C   : void TCOD_zip_put_float(TCOD_zip_t zip, float val)
</pre></p>
<br />
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>zip</td><td>In the C version, the buffer handler, returned by the <a href="zip_init.html">constructor</a>.<br /></td></tr>
<tr><td>val</td><td>A float value to store in the buffer</td></tr>
</table>
<hr />
<p class="code"><pre>
C++ : void TCODZip::putString(const char *val)
C   : void TCOD_zip_put_string(TCOD_zip_t zip, const char *val)
</pre></p>
<br />
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>zip</td><td>In the C version, the buffer handler, returned by the <a href="zip_init.html">constructor</a>.<br /></td></tr>
<tr><td>val</td><td>A string to store in the buffer</td></tr>
</table>
<hr />
<p class="code"><pre>
C++ : void TCODZip::putColor(const TCODColor *val)
C   : void TCOD_zip_put_color(TCOD_zip_t zip, const TCOD_color_t val)
</pre></p>
<br />
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>zip</td><td>In the C version, the buffer handler, returned by the <a href="zip_init.html">constructor</a>.<br /></td></tr>
<tr><td>val</td><td>A color to store in the buffer</td></tr>
</table>
<hr />
<p class="code"><pre>
C++ : void TCODZip::putImage(const TCODImage *val)
C   : void TCOD_zip_put_image(TCOD_zip_t zip, const TCOD_image_t val)
</pre></p>
<br />
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>zip</td><td>In the C version, the buffer handler, returned by the <a href="zip_init.html">constructor</a>.<br /></td></tr>
<tr><td>val</td><td>An image to store in the buffer</td></tr>
</table>
<hr />
<p class="code"><pre>
C++ : void TCODZip::putConsole(const TCODConsole *val)
C   : void TCOD_zip_put_console(TCOD_zip_t zip, const TCOD_console_t val)
</pre></p>
<br />
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>zip</td><td>In the C version, the buffer handler, returned by the <a href="zip_init.html">constructor</a>.<br /></td></tr>
<tr><td>val</td><td>A console to store in the buffer</td></tr>
</table>
<hr />
<p class="code"><pre>
C++ : void TCODZip::putData(int nbBytes, const void *data)
C   : void TCOD_zip_put_data(TCOD_zip_t zip, int nbBytes, const void *data)
</pre></p>
<br />
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>zip</td><td>In the C version, the buffer handler, returned by the <a href="zip_init.html">constructor</a>.<br /></td></tr>
<tr><td>nbBytes</td><td>Number of bytes to store in the buffer</td></tr>
<tr><td>val</td><td>Address of the data to store in the buffer</td></tr>
</table>
<hr />

